package trab3.msgs;

import java.awt.* ;
import java.util.* ;

import sim.core.*;
import trab3.time.*;


@SuppressWarnings("serial")
public class ChangeColor extends SerializedMessage {
	public Color color ;
	public boolean veto ;
	public Map< Class<? extends Clock>, TimeStamp> timeStamps ;
	
	public int serial = g_serial++ ;
	
	static int g_serial = 0 ;
	public ChangeColor( boolean v, Map<Class<? extends Clock>, TimeStamp> tsm, Color c ) {
		super(false, c) ;
		timeStamps = tsm ;
		color = c ;
		veto = v ;
	}
		
	/* (non-Javadoc)
	 * <b>IMPORTANT!!!</b> Include a copy of this method in every class that extends Message
	 * @see sim.core.Message#deliverTo(sim.net.EndPoint, sim.core.MessageHandler)
	 */
	public void deliverTo( EndPoint src, MessageHandler handler ) {
		((ExtendedMessageHandler)handler).onReceive( src, this ) ;
	}
	
	
	public String toString() {
		return serial + "/ " + timeStamps.toString() ;
	}

	public double simTimeStamp = Simulation.currentTime() ;
}
